﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ThapCam.Ulti
{
    public sealed class StringParam
    {
        private string[] _array;

        public StringParam(string value, string delimiter)
        {
            string[] deli = new string[] { delimiter };
            if (value != null && value.Length != 0)
                _array = value.Split(deli, StringSplitOptions.RemoveEmptyEntries);
        }

        public int Length
        {
            get
            {
                return _array == null ? 0 : _array.Length;
            }
        }

        public string getParamByIndex(int index)
        {
            if (_array != null && _array.Length != 0)
                return _array[index];
            return null;
        }
    }
}
